﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Sales" targetNamespace="http://tempuri.org/Sales.xsd" xmlns:mstns="http://tempuri.org/Sales.xsd" xmlns="http://tempuri.org/Sales.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" GeneratorFunctionsComponentClassName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="QueriesTableAdapter" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="DIAptekaConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="DIAptekaConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DIProject.Properties.Settings.GlobalReference.Default.DIAptekaConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CashRegisterOpenTableAdapter" GeneratorDataComponentClassName="CashRegisterOpenTableAdapter" Name="CashRegisterOpen" UserDataComponentName="CashRegisterOpenTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CD.CashRegisters" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     r.Id AS id, r.Name AS name, r.KKMNumber AS kkmNumber
FROM         CD.CashRegisters AS r LEFT OUTER JOIN
                      CD.CashRegisterShifts AS s ON s.CashRegisterId = r.Id AND s.CloseDT IS NULL
WHERE     (s.CashRegisterId IS NULL) AND (r.KKMNumber = @KKMNumber)
GROUP BY r.Id, r.Name, r.KKMNumber
ORDER BY name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="KKMNumber" ColumnName="KKMNumber" DataSourceName="DIApteka.CD.CashRegisters" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@KKMNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="kkmNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CashRegisterShiftsInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CashRegisterId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CashRegisterId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@OpenUserId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="OpenUserId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id" DataSetColumn="id" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="kkmNumber" DataSetColumn="kkmNumber" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CashRegisterCloseTableAdapter" GeneratorDataComponentClassName="CashRegisterCloseTableAdapter" Name="CashRegisterClose" UserDataComponentName="CashRegisterCloseTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     r.Id AS id, s.Id AS shiftId, r.Name AS name, r.KKMNumber AS kkmNumber
FROM         CD.CashRegisters AS r INNER JOIN
                      CD.CashRegisterShifts AS s ON s.CashRegisterId = r.Id AND s.CloseDT IS NULL
WHERE     (r.KKMNumber = @KKMNumber)
ORDER BY name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="KKMNumber" ColumnName="KKMNumber" DataSourceName="DilanOstankino.CD.CashRegisters" DataTypeServer="varchar(20)" DbType="AnsiString" Direction="Input" ParameterName="@KKMNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="kkmNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CloseCashRegisterShift</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CashRegisterId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CashRegisterId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CloseUserId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="CloseUserId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@ShiftId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="id" DataSetColumn="id" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="kkmNumber" DataSetColumn="kkmNumber" />
              <Mapping SourceColumn="shiftId" DataSetColumn="shiftId" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CashRegisterLinesTableAdapter" GeneratorDataComponentClassName="CashRegisterLinesTableAdapter" Name="CashRegisterLines" UserDataComponentName="CashRegisterLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CashRegisterLinesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CashRegisterLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@PartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     l.Id, l.GId, l.DocId, l.PartyId, v.FullName AS Name, v.ManufacturerName, - l.Qntty AS Qntty, p.RetailPrice, - l.RetailSum AS RetailSum, l.ReturnLineId, 
                      l.Note, l.MD, l.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      CA.Goods AS g ON g.Id = p.GoodsId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = p.GoodsId
WHERE     (d.DocTypeId = 3) AND (d.Id = @DocId)
ORDER BY Name, v.ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CashRegisterLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@PartyId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PartyId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="NewCashRegisterDocTableAdapter" GeneratorDataComponentClassName="NewCashRegisterDocTableAdapter" Name="NewCashRegisterDoc" UserDataComponentName="NewCashRegisterDocTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.CashRegisterDocInsert" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CashRegisterDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CashRegisterDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocNumber" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CashRegisterShiftId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DepartmentUserId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CashRegisterDocUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumn="DocDate" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="DocNumber" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DepartmentUserId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DepartmentUserId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocTypeId" DataSetColumn="DocTypeId" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ContragentId" DataSetColumn="ContragentId" />
              <Mapping SourceColumn="CashRegisterShiftId" DataSetColumn="CashRegisterShiftId" />
              <Mapping SourceColumn="DepartmentUserId" DataSetColumn="DepartmentUserId" />
              <Mapping SourceColumn="DepartmentId" DataSetColumn="DepartmentId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GoodsSearchTableAdapter" GeneratorDataComponentClassName="GoodsSearchTableAdapter" Name="GoodsSearch" UserDataComponentName="GoodsSearchTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.GoodsSearch" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>GoodsSearch</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Barcode" Precision="0" ProviderType="VarChar" Scale="0" Size="13" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="150" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="Barcode" DataSetColumn="Barcode" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="NewCustomerReturnDocTableAdapter" GeneratorDataComponentClassName="NewCustomerReturnDocTableAdapter" Name="NewCustomerReturnDoc" UserDataComponentName="NewCustomerReturnDocTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.dbo.CustomerReturnDocInsert" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CustomerReturnDocDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>dbo.CustomerReturnDocInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@DocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ContragentDocDate" Precision="16" ProviderType="SmallDateTime" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContragentDocNumber" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocTypeId" DataSetColumn="DocTypeId" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="ContragentDocDate" DataSetColumn="ContragentDocDate" />
              <Mapping SourceColumn="ContragentDocNumber" DataSetColumn="ContragentDocNumber" />
              <Mapping SourceColumn="DepartmentUserId" DataSetColumn="DepartmentUserId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CashRegistersCanReturnTableAdapter" GeneratorDataComponentClassName="CashRegistersCanReturnTableAdapter" Name="CashRegistersCanReturn" UserDataComponentName="CashRegistersCanReturnTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>IF @CashRegisterShiftId IS NOT NULL /* Чеки в открытой смене*/ SELECT d .Id, r.Name, r.KKMNumber, d .DocDate, d .DocNumber
                                                                                    FROM         cd.CashRegisterShifts s JOIN
                                                                                                          cd.CashRegisters r ON r.Id = s.CashRegisterId JOIN
                                                                                                          ca.Documents d ON d .CashRegisterShiftId = s.Id AND d .DocTypeId = 3
                                                                                    WHERE     s.Id = @CashRegisterShiftId AND s.CloseDT IS NULL
                                                                                    ORDER BY r.Name, d .DocDate, d .DocNumber ELSE
                                                                                                              /* Чеки в закрытой смене*/ SELECT d .Id, r.Name, r.KKMNumber, d .DocDate, d .DocNumber
                                                                                                               FROM         cd.CashRegisterShifts s JOIN
                                                                                                                                      cd.CashRegisters r ON r.Id = s.CashRegisterId JOIN
                                                                                                                                      ca.Documents d ON d .CashRegisterShiftId = s.Id AND d .DocTypeId = 3
                                                                                                               WHERE     s.CloseDT IS NOT NULL
                                                                                                               ORDER BY r.Name, d .DocDate, d .DocNumber</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CashRegisterShiftId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="KKMNumber" DataSetColumn="KKMNumber" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CustomerReturnLinesTableAdapter" GeneratorDataComponentClassName="CustomerReturnLinesTableAdapter" Name="CustomerReturnLines" UserDataComponentName="CustomerReturnLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CustomerReturnLinesDelete</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CustomerReturnLinesInsert</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="DocId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ReturnLineId" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReturnLineId" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     l.Id, l.DocId, l.PartyId, a.Name, l.Qntty, p.RetailPrice, l.RetailSum, l.ReturnLineId, l.Note, l.MD, l.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      CA.Goods AS g ON g.Id = p.GoodsId INNER JOIN
                      CA.Assortment AS a ON a.Id = g.AssortmentId
WHERE     (d.DocTypeId = 7) AND (d.Id = @DocId)
ORDER BY a.Name</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIOffice.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="False">
                    <CommandText>CustomerReturnLinesUpdate</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Qntty" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Qntty" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RetailSum" Precision="19" ProviderType="Decimal" Scale="2" Size="9" SourceColumn="RetailSum" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumn="Note" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@MW" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="MW" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                      <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_MD" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="MD" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="DepartmentUserTableAdapter" GeneratorDataComponentClassName="DepartmentUserTableAdapter" Name="DepartmentUser" UserDataComponentName="DepartmentUserTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CD.DepartmentUsers" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id
	,	LastName
	,	FirstName
	,	SecondName
from	cd.departmentUsers
where	Login	=suser_name()
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="LastName" DataSetColumn="LastName" />
              <Mapping SourceColumn="FirstName" DataSetColumn="FirstName" />
              <Mapping SourceColumn="SecondName" DataSetColumn="SecondName" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ChecksTableAdapter" GeneratorDataComponentClassName="ChecksTableAdapter" Name="Checks" UserDataComponentName="ChecksTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     d.Id, q.Name AS CashRegisterName, q.KKMNumber AS CashRegisterNumber, u.LastName + ' ' + u.FirstName + ' ' + u.SecondName AS Casher, 
                      d.DocDate, d.DocNumber, COUNT(l.Id) AS Lines, COALESCE (SUM(- l.RetailSum), 0) AS DocSum, CASE COUNT(r.Id) WHEN 0 THEN NULL 
                      ELSE COUNT(r.Id) END AS ReturnLines, CASE COUNT(r.Id) WHEN 0 THEN NULL ELSE COALESCE (SUM(r.RetailSum), 0) END AS ReturnSum, d.Note, 
                      d.MD, d.MW
FROM         CA.Documents AS d INNER JOIN
                      CD.DepartmentUsers AS u ON u.Id = d.DepartmentUserId INNER JOIN
                      CD.CashRegisterShifts AS s ON s.Id = d.CashRegisterShiftId INNER JOIN
                      CD.CashRegisters AS q ON q.Id = s.CashRegisterId LEFT OUTER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id LEFT OUTER JOIN
                      CA.GoodsDocLines AS r ON r.ReturnLineId = l.Id
WHERE     (d.DocTypeId = 3)
GROUP BY d.Id, q.Name, q.KKMNumber, u.LastName, u.FirstName, u.SecondName, d.DocDate, d.DocNumber, d.Note, d.MD, d.MW
ORDER BY CashRegisterName, CashRegisterNumber, d.DocDate, d.DocNumber</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="ReturnLines" DataSetColumn="ReturnLines" />
              <Mapping SourceColumn="ReturnSum" DataSetColumn="ReturnSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
              <Mapping SourceColumn="CashRegisterName" DataSetColumn="CashRegisterName" />
              <Mapping SourceColumn="CashRegisterNumber" DataSetColumn="CashRegisterNumber" />
              <Mapping SourceColumn="Casher" DataSetColumn="Casher" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CheckLinesTableAdapter" GeneratorDataComponentClassName="CheckLinesTableAdapter" Name="CheckLines" UserDataComponentName="CheckLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT     l.Id, l.DocId, l.PartyId, v.FullName AS Name, v.ManufacturerName, p.RetailPrice, - l.Qntty AS Qntty, - l.RetailSum AS RetailSum, r.Id AS ReturnLineId, 
                      r.Qntty AS ReturnQntty, r.RetailSum AS ReturnRetailSum, l.Note, l.MD, l.MW
FROM         CA.Documents AS d INNER JOIN
                      CA.GoodsDocLines AS l ON l.DocId = d.Id LEFT OUTER JOIN
                      CA.GoodsDocLines AS r ON r.ReturnLineId = l.Id INNER JOIN
                      CD.Parties AS p ON p.Id = l.PartyId INNER JOIN
                      CA.Goods AS g ON g.Id = p.GoodsId INNER JOIN
                      vwGoodsDetailed AS v ON v.Id = p.GoodsId
WHERE     (d.DocTypeId = 3) AND (d.Id = @DocId)
ORDER BY Name, v.ManufacturerName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIOffice.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="ReturnQntty" DataSetColumn="ReturnQntty" />
              <Mapping SourceColumn="ReturnRetailSum" DataSetColumn="ReturnRetailSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CheckReturnsTableAdapter" GeneratorDataComponentClassName="CheckReturnsTableAdapter" Name="CheckReturns" UserDataComponentName="CheckReturnsTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="DIApteka.CA.Documents" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= d.Id
	,	DocDate				= d.DocDate
	,	DocNumber			= d.DocNumber
	,	Lines				= count(l.Id)
	,	DocSum				= coalesce(sum(l.RetailSum), 0)
	,	Note				= d.Note
	,	MD					= d.MD
	,	MW					= d.MW
from	ca.Documents		d
left join ca.GoodsDocLines	l
	on	l.DocId				= d.Id
where	d.DocTypeId			= 7
group by d.Id, d.DocDate, d.DocNumber, d.Note, d.MD, d.MW
order by d.DocDate, d.DocNumber
</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="DocDate" DataSetColumn="DocDate" />
              <Mapping SourceColumn="DocNumber" DataSetColumn="DocNumber" />
              <Mapping SourceColumn="Lines" DataSetColumn="Lines" />
              <Mapping SourceColumn="DocSum" DataSetColumn="DocSum" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CheckReturnLinesTableAdapter" GeneratorDataComponentClassName="CheckReturnLinesTableAdapter" Name="CheckReturnLines" UserDataComponentName="CheckReturnLinesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>select	Id					= l.Id
	,	GId					= l.GId
	,	DocId				= l.DocId
	,	PartyId				= l.PartyId
	,	CashRegisterName	= q.Name
	,	CashRegisterNumber	= q.KKMNumber
	,	Casher				= u.LastName + ' ' + u.FirstName + ' ' + u.SecondName
	,	Name				= v.FullName
	,	ManufacturerName	= v.ManufacturerName
	,	Qntty				= l.Qntty
	,	RetailPrice			= p.RetailPrice
	,	RetailSum			= l.RetailSum
	,	ReturnLineId		= l.ReturnLineId
	,	Note				= l.Note
	,	MD					= l.MD
	,	MW					= l.MW
from	ca.Documents		d
join	ca.GoodsDocLines	l
	on	l.DocId				= d.Id
join	ca.GoodsDocLines	pl
	on	pl.Id				= l.ReturnLineId
join	ca.Documents		pd
	on	pd.Id				= pl.DocId
join	cd.DepartmentUsers	u
	on	u.Id				= pd.DepartmentUserId
join	cd.CashRegisterShifts s
	on	s.Id				= pd.CashRegisterShiftId
join	cd.CashRegisters	q
	on	q.Id				= s.CashRegisterId

join	cd.Parties			p
	on	p.Id				= l.PartyId
join	ca.Goods			g
	on	g.Id				= p.GoodsId
join	dbo.vwGoodsDetailed	v
	on	v.Id				= p.GoodsId
where	d.DocTypeId			= 7
	and	d.Id				= @DocId
order by q.Name, q.KKMNumber, v.FullName, v.ManufacturerName
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="DocId" ColumnName="Id" DataSourceName="DIApteka.CA.Documents" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DocId" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="GId" DataSetColumn="GId" />
              <Mapping SourceColumn="DocId" DataSetColumn="DocId" />
              <Mapping SourceColumn="PartyId" DataSetColumn="PartyId" />
              <Mapping SourceColumn="CashRegisterName" DataSetColumn="CashRegisterName" />
              <Mapping SourceColumn="CashRegisterNumber" DataSetColumn="CashRegisterNumber" />
              <Mapping SourceColumn="Casher" DataSetColumn="Casher" />
              <Mapping SourceColumn="Name" DataSetColumn="Name" />
              <Mapping SourceColumn="ManufacturerName" DataSetColumn="ManufacturerName" />
              <Mapping SourceColumn="Qntty" DataSetColumn="Qntty" />
              <Mapping SourceColumn="RetailPrice" DataSetColumn="RetailPrice" />
              <Mapping SourceColumn="RetailSum" DataSetColumn="RetailSum" />
              <Mapping SourceColumn="ReturnLineId" DataSetColumn="ReturnLineId" />
              <Mapping SourceColumn="Note" DataSetColumn="Note" />
              <Mapping SourceColumn="MD" DataSetColumn="MD" />
              <Mapping SourceColumn="MW" DataSetColumn="MW" />
            </Mappings>
            <Sources>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="DIAptekaConnectionString (Settings)" DbObjectName="Gelez.CD.Parties" DbObjectType="Table" GenerateShortCommands="True" GeneratorSourceName="GoodsFromParty" MethodsParameterType="CLR" Modifier="Public" Name="GoodsFromParty" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="GoodsFromParty">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="True">
                <CommandText>SELECT     GoodsId
FROM         CD.Parties
WHERE     (Id = @Id)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="False" AutogeneratedName="Id" ColumnName="Id" DataSourceName="Gelez.CD.Parties" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="False" SourceVersion="Current">
                  </Parameter>
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Sales" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Sales" msprop:Generator_DataSetName="Sales">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="CashRegisterOpen" msprop:Generator_UserTableName="CashRegisterOpen" msprop:Generator_RowDeletedName="CashRegisterOpenRowDeleted" msprop:Generator_RowChangedName="CashRegisterOpenRowChanged" msprop:Generator_RowClassName="CashRegisterOpenRow" msprop:Generator_RowChangingName="CashRegisterOpenRowChanging" msprop:Generator_RowEvArgName="CashRegisterOpenRowChangeEvent" msprop:Generator_RowEvHandlerName="CashRegisterOpenRowChangeEventHandler" msprop:Generator_TableClassName="CashRegisterOpenDataTable" msprop:Generator_TableVarName="tableCashRegisterOpen" msprop:Generator_RowDeletingName="CashRegisterOpenRowDeleting" msprop:Generator_TablePropName="CashRegisterOpen">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="id" msprop:Generator_ColumnPropNameInRow="id" msprop:Generator_ColumnVarNameInTable="columnid" msprop:Generator_ColumnPropNameInTable="idColumn" type="xs:int" />
              <xs:element name="name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="name" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInTable="nameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="kkmNumber" msdata:ReadOnly="true" msprop:Generator_UserColumnName="kkmNumber" msprop:Generator_ColumnPropNameInRow="kkmNumber" msprop:Generator_ColumnVarNameInTable="columnkkmNumber" msprop:Generator_ColumnPropNameInTable="kkmNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CashRegisterClose" msprop:Generator_UserTableName="CashRegisterClose" msprop:Generator_RowDeletedName="CashRegisterCloseRowDeleted" msprop:Generator_RowChangedName="CashRegisterCloseRowChanged" msprop:Generator_RowClassName="CashRegisterCloseRow" msprop:Generator_RowChangingName="CashRegisterCloseRowChanging" msprop:Generator_RowEvArgName="CashRegisterCloseRowChangeEvent" msprop:Generator_RowEvHandlerName="CashRegisterCloseRowChangeEventHandler" msprop:Generator_TableClassName="CashRegisterCloseDataTable" msprop:Generator_TableVarName="tableCashRegisterClose" msprop:Generator_RowDeletingName="CashRegisterCloseRowDeleting" msprop:Generator_TablePropName="CashRegisterClose">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="id" msprop:Generator_ColumnPropNameInRow="id" msprop:Generator_ColumnVarNameInTable="columnid" msprop:Generator_ColumnPropNameInTable="idColumn" type="xs:int" />
              <xs:element name="name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="name" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInTable="nameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="kkmNumber" msdata:ReadOnly="true" msprop:Generator_UserColumnName="kkmNumber" msprop:Generator_ColumnPropNameInRow="kkmNumber" msprop:Generator_ColumnVarNameInTable="columnkkmNumber" msprop:Generator_ColumnPropNameInTable="kkmNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="shiftId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="shiftId" msprop:Generator_ColumnPropNameInRow="shiftId" msprop:Generator_ColumnVarNameInTable="columnshiftId" msprop:Generator_ColumnPropNameInTable="shiftIdColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CashRegisterLines" msprop:Generator_UserTableName="CashRegisterLines" msprop:Generator_RowDeletedName="CashRegisterLinesRowDeleted" msprop:Generator_RowChangedName="CashRegisterLinesRowChanged" msprop:Generator_RowClassName="CashRegisterLinesRow" msprop:Generator_RowChangingName="CashRegisterLinesRowChanging" msprop:Generator_RowEvArgName="CashRegisterLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="CashRegisterLinesRowChangeEventHandler" msprop:Generator_TableClassName="CashRegisterLinesDataTable" msprop:Generator_TableVarName="tableCashRegisterLines" msprop:Generator_RowDeletingName="CashRegisterLinesRowDeleting" msprop:Generator_TablePropName="CashRegisterLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="NewCashRegisterDoc" msprop:Generator_UserTableName="NewCashRegisterDoc" msprop:Generator_RowDeletedName="NewCashRegisterDocRowDeleted" msprop:Generator_RowChangedName="NewCashRegisterDocRowChanged" msprop:Generator_RowClassName="NewCashRegisterDocRow" msprop:Generator_RowChangingName="NewCashRegisterDocRowChanging" msprop:Generator_RowEvArgName="NewCashRegisterDocRowChangeEvent" msprop:Generator_RowEvHandlerName="NewCashRegisterDocRowChangeEventHandler" msprop:Generator_TableClassName="NewCashRegisterDocDataTable" msprop:Generator_TableVarName="tableNewCashRegisterDoc" msprop:Generator_RowDeletingName="NewCashRegisterDocRowDeleting" msprop:Generator_TablePropName="NewCashRegisterDoc">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocTypeId" msprop:Generator_UserColumnName="DocTypeId" msprop:Generator_ColumnPropNameInRow="DocTypeId" msprop:Generator_ColumnVarNameInTable="columnDocTypeId" msprop:Generator_ColumnPropNameInTable="DocTypeIdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentId" msprop:Generator_UserColumnName="ContragentId" msprop:Generator_ColumnPropNameInRow="ContragentId" msprop:Generator_ColumnVarNameInTable="columnContragentId" msprop:Generator_ColumnPropNameInTable="ContragentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CashRegisterShiftId" msprop:Generator_UserColumnName="CashRegisterShiftId" msprop:Generator_ColumnPropNameInRow="CashRegisterShiftId" msprop:Generator_ColumnVarNameInTable="columnCashRegisterShiftId" msprop:Generator_ColumnPropNameInTable="CashRegisterShiftIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DepartmentUserId" msprop:Generator_UserColumnName="DepartmentUserId" msprop:Generator_ColumnPropNameInRow="DepartmentUserId" msprop:Generator_ColumnVarNameInTable="columnDepartmentUserId" msprop:Generator_ColumnPropNameInTable="DepartmentUserIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DepartmentId" msprop:Generator_UserColumnName="DepartmentId" msprop:Generator_ColumnPropNameInRow="DepartmentId" msprop:Generator_ColumnVarNameInTable="columnDepartmentId" msprop:Generator_ColumnPropNameInTable="DepartmentIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="GoodsSearch" msprop:Generator_UserTableName="GoodsSearch" msprop:Generator_RowDeletedName="GoodsSearchRowDeleted" msprop:Generator_RowChangedName="GoodsSearchRowChanged" msprop:Generator_RowClassName="GoodsSearchRow" msprop:Generator_RowChangingName="GoodsSearchRowChanging" msprop:Generator_RowEvArgName="GoodsSearchRowChangeEvent" msprop:Generator_RowEvHandlerName="GoodsSearchRowChangeEventHandler" msprop:Generator_TableClassName="GoodsSearchDataTable" msprop:Generator_TableVarName="tableGoodsSearch" msprop:Generator_RowDeletingName="GoodsSearchRowDeleting" msprop:Generator_TablePropName="GoodsSearch">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="PartyId" msdata:ReadOnly="true" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Barcode" msprop:Generator_UserColumnName="Barcode" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Barcode" msprop:Generator_ColumnPropNameInTable="BarcodeColumn" msprop:Generator_ColumnVarNameInTable="columnBarcode" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnPropNameInRow="ManufacturerName" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="NewCustomerReturnDoc" msprop:Generator_UserTableName="NewCustomerReturnDoc" msprop:Generator_RowDeletedName="NewCustomerReturnDocRowDeleted" msprop:Generator_RowChangedName="NewCustomerReturnDocRowChanged" msprop:Generator_RowClassName="NewCustomerReturnDocRow" msprop:Generator_RowChangingName="NewCustomerReturnDocRowChanging" msprop:Generator_RowEvArgName="NewCustomerReturnDocRowChangeEvent" msprop:Generator_RowEvHandlerName="NewCustomerReturnDocRowChangeEventHandler" msprop:Generator_TableClassName="NewCustomerReturnDocDataTable" msprop:Generator_TableVarName="tableNewCustomerReturnDoc" msprop:Generator_RowDeletingName="NewCustomerReturnDocRowDeleting" msprop:Generator_TablePropName="NewCustomerReturnDoc">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocTypeId" msprop:Generator_UserColumnName="DocTypeId" msprop:Generator_ColumnVarNameInTable="columnDocTypeId" msprop:Generator_ColumnPropNameInRow="DocTypeId" msprop:Generator_ColumnPropNameInTable="DocTypeIdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ContragentDocDate" msprop:Generator_UserColumnName="ContragentDocDate" msprop:Generator_ColumnVarNameInTable="columnContragentDocDate" msprop:Generator_ColumnPropNameInRow="ContragentDocDate" msprop:Generator_ColumnPropNameInTable="ContragentDocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="ContragentDocNumber" msprop:Generator_UserColumnName="ContragentDocNumber" msprop:Generator_ColumnVarNameInTable="columnContragentDocNumber" msprop:Generator_ColumnPropNameInRow="ContragentDocNumber" msprop:Generator_ColumnPropNameInTable="ContragentDocNumberColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DepartmentUserId" msprop:Generator_UserColumnName="DepartmentUserId" msprop:Generator_ColumnVarNameInTable="columnDepartmentUserId" msprop:Generator_ColumnPropNameInRow="DepartmentUserId" msprop:Generator_ColumnPropNameInTable="DepartmentUserIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CashRegistersCanReturn" msprop:Generator_UserTableName="CashRegistersCanReturn" msprop:Generator_RowDeletedName="CashRegistersCanReturnRowDeleted" msprop:Generator_RowChangedName="CashRegistersCanReturnRowChanged" msprop:Generator_RowClassName="CashRegistersCanReturnRow" msprop:Generator_RowChangingName="CashRegistersCanReturnRowChanging" msprop:Generator_RowEvArgName="CashRegistersCanReturnRowChangeEvent" msprop:Generator_RowEvHandlerName="CashRegistersCanReturnRowChangeEventHandler" msprop:Generator_TableClassName="CashRegistersCanReturnDataTable" msprop:Generator_TableVarName="tableCashRegistersCanReturn" msprop:Generator_RowDeletingName="CashRegistersCanReturnRowDeleting" msprop:Generator_TablePropName="CashRegistersCanReturn">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" type="xs:string" minOccurs="0" />
              <xs:element name="KKMNumber" msprop:Generator_UserColumnName="KKMNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnKKMNumber" msprop:Generator_ColumnPropNameInTable="KKMNumberColumn" msprop:Generator_ColumnPropNameInRow="KKMNumber" type="xs:string" minOccurs="0" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CustomerReturnLines" msprop:Generator_UserTableName="CustomerReturnLines" msprop:Generator_RowDeletedName="CustomerReturnLinesRowDeleted" msprop:Generator_RowChangedName="CustomerReturnLinesRowChanged" msprop:Generator_RowClassName="CustomerReturnLinesRow" msprop:Generator_RowChangingName="CustomerReturnLinesRowChanging" msprop:Generator_RowEvArgName="CustomerReturnLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="CustomerReturnLinesRowChangeEventHandler" msprop:Generator_TableClassName="CustomerReturnLinesDataTable" msprop:Generator_TableVarName="tableCustomerReturnLines" msprop:Generator_RowDeletingName="CustomerReturnLinesRowDeleting" msprop:Generator_TablePropName="CustomerReturnLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DepartmentUser" msprop:Generator_UserTableName="DepartmentUser" msprop:Generator_RowDeletedName="DepartmentUserRowDeleted" msprop:Generator_RowChangedName="DepartmentUserRowChanged" msprop:Generator_RowClassName="DepartmentUserRow" msprop:Generator_RowChangingName="DepartmentUserRowChanging" msprop:Generator_RowEvArgName="DepartmentUserRowChangeEvent" msprop:Generator_RowEvHandlerName="DepartmentUserRowChangeEventHandler" msprop:Generator_TableClassName="DepartmentUserDataTable" msprop:Generator_TableVarName="tableDepartmentUser" msprop:Generator_RowDeletingName="DepartmentUserRowDeleting" msprop:Generator_TablePropName="DepartmentUser">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="LastName" msprop:Generator_UserColumnName="LastName" msprop:Generator_ColumnPropNameInRow="LastName" msprop:Generator_ColumnVarNameInTable="columnLastName" msprop:Generator_ColumnPropNameInTable="LastNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FirstName" msprop:Generator_UserColumnName="FirstName" msprop:Generator_ColumnPropNameInRow="FirstName" msprop:Generator_ColumnVarNameInTable="columnFirstName" msprop:Generator_ColumnPropNameInTable="FirstNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="SecondName" msprop:Generator_UserColumnName="SecondName" msprop:Generator_ColumnPropNameInRow="SecondName" msprop:Generator_ColumnVarNameInTable="columnSecondName" msprop:Generator_ColumnPropNameInTable="SecondNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Checks" msprop:Generator_UserTableName="Checks" msprop:Generator_RowDeletedName="ChecksRowDeleted" msprop:Generator_RowChangedName="ChecksRowChanged" msprop:Generator_RowClassName="ChecksRow" msprop:Generator_RowChangingName="ChecksRowChanging" msprop:Generator_RowEvArgName="ChecksRowChangeEvent" msprop:Generator_RowEvHandlerName="ChecksRowChangeEventHandler" msprop:Generator_TableClassName="ChecksDataTable" msprop:Generator_TableVarName="tableChecks" msprop:Generator_RowDeletingName="ChecksRowDeleting" msprop:Generator_TablePropName="Checks">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnDocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnPropNameInRow="DocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocSum" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLines" msprop:Generator_UserColumnName="ReturnLines" msprop:Generator_ColumnPropNameInRow="ReturnLines" msprop:Generator_ColumnVarNameInTable="columnReturnLines" msprop:Generator_ColumnPropNameInTable="ReturnLinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ReturnSum" msprop:Generator_UserColumnName="ReturnSum" msprop:Generator_ColumnPropNameInRow="ReturnSum" msprop:Generator_ColumnVarNameInTable="columnReturnSum" msprop:Generator_ColumnPropNameInTable="ReturnSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CashRegisterName" msprop:Generator_UserColumnName="CashRegisterName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CashRegisterName" msprop:Generator_ColumnPropNameInTable="CashRegisterNameColumn" msprop:Generator_ColumnVarNameInTable="columnCashRegisterName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CashRegisterNumber" msprop:Generator_UserColumnName="CashRegisterNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="CashRegisterNumber" msprop:Generator_ColumnPropNameInTable="CashRegisterNumberColumn" msprop:Generator_ColumnVarNameInTable="columnCashRegisterNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Casher" msprop:Generator_UserColumnName="Casher" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCasher" msprop:Generator_ColumnPropNameInTable="CasherColumn" msprop:Generator_ColumnPropNameInRow="Casher" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="152" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CheckLines" msprop:Generator_UserTableName="CheckLines" msprop:Generator_RowDeletedName="CheckLinesRowDeleted" msprop:Generator_RowChangedName="CheckLinesRowChanged" msprop:Generator_RowClassName="CheckLinesRow" msprop:Generator_RowChangingName="CheckLinesRowChanging" msprop:Generator_RowEvArgName="CheckLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="CheckLinesRowChangeEventHandler" msprop:Generator_TableClassName="CheckLinesDataTable" msprop:Generator_TableVarName="tableCheckLines" msprop:Generator_RowDeletingName="CheckLinesRowDeleting" msprop:Generator_TablePropName="CheckLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msdata:ReadOnly="true" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnVarNameInTable="columnName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" />
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ReturnQntty" msprop:Generator_UserColumnName="ReturnQntty" msprop:Generator_ColumnPropNameInRow="ReturnQntty" msprop:Generator_ColumnVarNameInTable="columnReturnQntty" msprop:Generator_ColumnPropNameInTable="ReturnQnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="ReturnRetailSum" msprop:Generator_UserColumnName="ReturnRetailSum" msprop:Generator_ColumnPropNameInRow="ReturnRetailSum" msprop:Generator_ColumnVarNameInTable="columnReturnRetailSum" msprop:Generator_ColumnPropNameInTable="ReturnRetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CheckReturns" msprop:Generator_UserTableName="CheckReturns" msprop:Generator_RowDeletedName="CheckReturnsRowDeleted" msprop:Generator_RowChangedName="CheckReturnsRowChanged" msprop:Generator_RowClassName="CheckReturnsRow" msprop:Generator_RowChangingName="CheckReturnsRowChanging" msprop:Generator_RowEvArgName="CheckReturnsRowChangeEvent" msprop:Generator_RowEvHandlerName="CheckReturnsRowChangeEventHandler" msprop:Generator_TableClassName="CheckReturnsDataTable" msprop:Generator_TableVarName="tableCheckReturns" msprop:Generator_RowDeletingName="CheckReturnsRowDeleting" msprop:Generator_TablePropName="CheckReturns">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="DocDate" msprop:Generator_UserColumnName="DocDate" msprop:Generator_ColumnPropNameInRow="DocDate" msprop:Generator_ColumnVarNameInTable="columnDocDate" msprop:Generator_ColumnPropNameInTable="DocDateColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="DocNumber" msprop:Generator_UserColumnName="DocNumber" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="DocNumber" msprop:Generator_ColumnPropNameInTable="DocNumberColumn" msprop:Generator_ColumnVarNameInTable="columnDocNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lines" msprop:Generator_UserColumnName="Lines" msprop:Generator_ColumnPropNameInRow="Lines" msprop:Generator_ColumnVarNameInTable="columnLines" msprop:Generator_ColumnPropNameInTable="LinesColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocSum" msprop:Generator_UserColumnName="DocSum" msprop:Generator_ColumnPropNameInRow="DocSum" msprop:Generator_ColumnVarNameInTable="columnDocSum" msprop:Generator_ColumnPropNameInTable="DocSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="Note" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnVarNameInTable="columnNote" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="MW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnVarNameInTable="columnMW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="CheckReturnLines" msprop:Generator_UserTableName="CheckReturnLines" msprop:Generator_RowDeletedName="CheckReturnLinesRowDeleted" msprop:Generator_RowChangedName="CheckReturnLinesRowChanged" msprop:Generator_RowClassName="CheckReturnLinesRow" msprop:Generator_RowChangingName="CheckReturnLinesRowChanging" msprop:Generator_RowEvArgName="CheckReturnLinesRowChangeEvent" msprop:Generator_RowEvHandlerName="CheckReturnLinesRowChangeEventHandler" msprop:Generator_TableClassName="CheckReturnLinesDataTable" msprop:Generator_TableVarName="tableCheckReturnLines" msprop:Generator_RowDeletingName="CheckReturnLinesRowDeleting" msprop:Generator_TablePropName="CheckReturnLines">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="Id" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" type="xs:int" />
              <xs:element name="GId" msprop:Generator_UserColumnName="GId" msprop:Generator_ColumnVarNameInTable="columnGId" msprop:Generator_ColumnPropNameInRow="GId" msprop:Generator_ColumnPropNameInTable="GIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="DocId" msprop:Generator_UserColumnName="DocId" msprop:Generator_ColumnVarNameInTable="columnDocId" msprop:Generator_ColumnPropNameInRow="DocId" msprop:Generator_ColumnPropNameInTable="DocIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="PartyId" msprop:Generator_UserColumnName="PartyId" msprop:Generator_ColumnVarNameInTable="columnPartyId" msprop:Generator_ColumnPropNameInRow="PartyId" msprop:Generator_ColumnPropNameInTable="PartyIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CashRegisterName" msprop:Generator_UserColumnName="CashRegisterName" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCashRegisterName" msprop:Generator_ColumnPropNameInTable="CashRegisterNameColumn" msprop:Generator_ColumnPropNameInRow="CashRegisterName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="CashRegisterNumber" msprop:Generator_UserColumnName="CashRegisterNumber" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCashRegisterNumber" msprop:Generator_ColumnPropNameInTable="CashRegisterNumberColumn" msprop:Generator_ColumnPropNameInRow="CashRegisterNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Casher" msprop:Generator_UserColumnName="Casher" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnCasher" msprop:Generator_ColumnPropNameInTable="CasherColumn" msprop:Generator_ColumnPropNameInRow="Casher" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="152" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_ColumnPropNameInRow="Name" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="213" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ManufacturerName" msprop:Generator_UserColumnName="ManufacturerName" msprop:Generator_ColumnVarNameInTable="columnManufacturerName" msprop:Generator_ColumnPropNameInRow="ManufacturerName" msprop:Generator_ColumnPropNameInTable="ManufacturerNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Qntty" msprop:Generator_UserColumnName="Qntty" msprop:Generator_ColumnVarNameInTable="columnQntty" msprop:Generator_ColumnPropNameInRow="Qntty" msprop:Generator_ColumnPropNameInTable="QnttyColumn" type="xs:int" minOccurs="0" />
              <xs:element name="RetailPrice" msprop:Generator_UserColumnName="RetailPrice" msprop:Generator_ColumnVarNameInTable="columnRetailPrice" msprop:Generator_ColumnPropNameInRow="RetailPrice" msprop:Generator_ColumnPropNameInTable="RetailPriceColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="RetailSum" msprop:Generator_UserColumnName="RetailSum" msprop:Generator_ColumnVarNameInTable="columnRetailSum" msprop:Generator_ColumnPropNameInRow="RetailSum" msprop:Generator_ColumnPropNameInTable="RetailSumColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="ReturnLineId" msprop:Generator_UserColumnName="ReturnLineId" msprop:Generator_ColumnVarNameInTable="columnReturnLineId" msprop:Generator_ColumnPropNameInRow="ReturnLineId" msprop:Generator_ColumnPropNameInTable="ReturnLineIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Note" msprop:Generator_UserColumnName="Note" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnNote" msprop:Generator_ColumnPropNameInTable="NoteColumn" msprop:Generator_ColumnPropNameInRow="Note" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="250" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="MD" msprop:Generator_UserColumnName="MD" msprop:Generator_ColumnVarNameInTable="columnMD" msprop:Generator_ColumnPropNameInRow="MD" msprop:Generator_ColumnPropNameInTable="MDColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="MW" msprop:Generator_UserColumnName="MW" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnMW" msprop:Generator_ColumnPropNameInTable="MWColumn" msprop:Generator_ColumnPropNameInRow="MW" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CashRegisterOpen" />
      <xs:field xpath="mstns:id" />
    </xs:unique>
    <xs:unique name="CashRegisterClose_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CashRegisterClose" />
      <xs:field xpath="mstns:id" />
    </xs:unique>
    <xs:unique name="NewCashRegisterDoc_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:NewCashRegisterDoc" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="NewCustomerReturnDoc_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:NewCustomerReturnDoc" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CashRegistersCanReturn_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CashRegistersCanReturn" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CustomerReturnLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CustomerReturnLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="DepartmentUser_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:DepartmentUser" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="Checks_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Checks" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CheckLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CheckLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CheckReturns_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CheckReturns" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
    <xs:unique name="CheckReturnLines_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CheckReturnLines" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>